package cn.zysuyuan.item.controller;

import cn.zysuyuan.common.entity.PageResult;
import cn.zysuyuan.item.entity.MedicinalEdition;
import cn.zysuyuan.item.service.MedicinalEditionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author flypig
 * @version 1.0
 * @date 2020-02-18 19:23
 */

@Api(tags = "药品归档信息")
@RestController
@RequestMapping("medicinalEdition")
public class MedicinalEditionController {

    @Autowired
    private MedicinalEditionService medicinalEditionService;

    @ApiOperation(value="某个时间版本的药材列表", notes="某个时间版本的药材列表")
    @GetMapping("medicinalEditionList")
    public ResponseEntity<PageResult<MedicinalEdition>> select(@RequestParam Map<String, Object> map) {
        PageResult<MedicinalEdition> result = medicinalEditionService.selectList(map);
        return ResponseEntity.ok(result);
    }

}
